using System;
using System.Collections.Generic;
using Top.Api.Response;
using Top.Api.Util;

namespace Top.Api.Request
{
    /// <summary>
    /// TOP API: taobao.promotion.membergrade.set
    /// </summary>
    public class PromotionMembergradeSetRequest : ITopRequest<PromotionMembergradeSetResponse>
    {
        /// <summary>
        /// 买家数字ID
        /// </summary>
        public Nullable<long> BuyerId { get; set; }

        /// <summary>
        /// 买家会员级别 general：普通会员 senior ：高级会员 vip：VIP会员 king：至尊VIP
        /// </summary>
        public string Grade { get; set; }

        #region ITopRequest Members

        public string GetApiName()
        {
            return "taobao.promotion.membergrade.set";
        }

        public IDictionary<string, string> GetParameters()
        {
            TopDictionary parameters = new TopDictionary();
            parameters.Add("buyer_id", this.BuyerId);
            parameters.Add("grade", this.Grade);
            return parameters;
        }

        public void Validate()
        {
            RequestValidator.ValidateRequired("buyer_id", this.BuyerId);
            RequestValidator.ValidateRequired("grade", this.Grade);
        }

        #endregion
    }
}
